import request from "@/utils/request";
const BASE_URL = "/flow/works";

// 获得列表
export function queryList(query) {
    return request({
        url: BASE_URL,
        method: "get",
        params: query,
    });
}
// 流程发起
export function queryStart(data) {
    return request({
        url: BASE_URL + '/start',
        method: "post",
        data: data,
    });
}
// 新建
export function createOne(data) {
    return request({
        url: BASE_URL,
        method: "post",
        data: data,
    });
}
// 查询
export function queryOne(id) {
    return request({
        url: BASE_URL + "/" + id,
        method: "get",
    });
}
// 删除
export function deleteOne(id) {
    return request({
        url: BASE_URL + "/" + id,
        method: "delete",
    });
}

export default {
    queryList,
    queryStart,
    deleteOne
}